<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>My Project: port.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">port.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#ifndef _PORT_HPP_</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#define _PORT_HPP_  1</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &lt;map&gt;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &lt;typeinfo&gt;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &lt;typeindex&gt;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &lt;functional&gt;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &quot;portbase.hpp&quot;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;graphtools.hpp&quot;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &quot;ringbuffertypes.hpp&quot;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &quot;fifo.hpp&quot;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &quot;port_info.hpp&quot;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &quot;ringbuffer.tcc&quot;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &quot;port_info_types.hpp&quot;</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &quot;portmap_t.hpp&quot;</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &quot;portiterator.hpp&quot;</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#include &quot;portexception.hpp&quot;</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="keyword">class </span><a class="code" href="class_map_base.html">MapBase</a>;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="keyword">class </span><a class="code" href="classroundrobin.html">roundrobin</a>;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="keyword">class </span><a class="code" href="classbasic__parallel.html">basic_parallel</a>;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceraft.html">raft</a></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;{</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;   <span class="keyword">class </span>kernel;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;   <span class="keyword">class </span>parallel_k;</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classraft_1_1join.html">   52</a></span>&#160;   <span class="keyword">template</span> &lt; <span class="keyword">class</span> T, <span class="keyword">class</span> method &gt; <span class="keyword">class </span><a class="code" href="classraft_1_1join.html">join</a>;</div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classraft_1_1split.html">   53</a></span>&#160;   <span class="keyword">template</span> &lt; <span class="keyword">class</span> T, <span class="keyword">class</span> method &gt; <span class="keyword">class </span><a class="code" href="classraft_1_1split.html">split</a>;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;}</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="class_port.html">   57</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_port.html">Port</a> : <span class="keyword">public</span> <a class="code" href="class_port_base.html">PortBase</a></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;{</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;   <a class="code" href="class_port.html#ac7da4ae14a771d5509e743e98fe0dc05">Port</a>( <a class="code" href="classraft_1_1kernel.html">raft::kernel</a> *k );</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;   </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;   <a class="code" href="class_port.html#ac7da4ae14a771d5509e743e98fe0dc05">Port</a>( <a class="code" href="classraft_1_1kernel.html">raft::kernel</a> *k, <span class="keywordtype">void</span> * <span class="keyword">const</span> ptr, <span class="keyword">const</span> std::size_t nbytes );</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;   <span class="keyword">virtual</span> <a class="code" href="class_port.html#afe166c2a6b10ad34d47472a150366bc1">~Port</a>();</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;   <span class="keyword">template</span> &lt; <span class="keyword">class</span> T &gt;</div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="class_port.html#aeb1c43cc7563ce977ba0bc7b581d2e75">   92</a></span>&#160;   <span class="keywordtype">void</span> <a class="code" href="class_port.html#aeb1c43cc7563ce977ba0bc7b581d2e75">addPort</a>( <span class="keyword">const</span> std::string &amp;&amp;port_name )</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;   {</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;      <a class="code" href="struct_port_info.html">PortInfo</a> pi( <span class="keyword">typeid</span>( T ) );</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;      pi.my_kernel = <a class="code" href="class_port.html#ac17060db235459adaab87cdccb605884">kernel</a>;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;      pi.my_name   = port_name;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;      (<span class="keyword">this</span>)-&gt;initializeConstMap&lt;T&gt;( pi );</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;      (<span class="keyword">this</span>)-&gt;initializeSplit&lt; T &gt;( pi );</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;      (<span class="keyword">this</span>)-&gt;initializeJoin&lt; T &gt;( pi );</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;      <span class="keyword">const</span> <span class="keyword">auto</span> ret_val( </div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;                  <a class="code" href="class_port.html#a537a8a0c2a47acbf8654f286200aee90">portmap</a>.map.insert( std::make_pair( port_name, </div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;                                                      pi ) ) );</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;      </div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;      <span class="keywordflow">if</span>( not ret_val.second )</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;      {</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;         <span class="keywordflow">throw</span> <a class="code" href="class_port_already_exists.html">PortAlreadyExists</a>( <span class="stringliteral">&quot;FATAL ERROR: port \&quot;&quot;</span> + port_name + <span class="stringliteral">&quot;\&quot; already exists!&quot;</span> );</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;      }</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;      <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;   }</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;   <span class="keyword">template</span> &lt; <span class="keyword">class</span> T &gt;</div>
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="class_port.html#aaf89e298b9ae64f9c42703c14d9eed0a">  124</a></span>&#160;   <span class="keywordtype">bool</span> <a class="code" href="class_port.html#aaf89e298b9ae64f9c42703c14d9eed0a">addInPlacePorts</a>( <span class="keyword">const</span> std::size_t n_ports )</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;   {</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;      T *existing_buff_t( reinterpret_cast&lt; T* &gt;( <a class="code" href="class_port.html#a78bf16e68f1dd5312f37b4e2806a9cf8">alloc_ptr</a> ) );</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;      std::size_t length( <a class="code" href="class_port.html#a98d2e7e0e570e082465c692083300fa9">alloc_ptr_length</a> / <span class="keyword">sizeof</span>( T ) );</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;      <span class="keyword">const</span> std::size_t inc( length / n_ports );</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;      <span class="keyword">const</span> std::size_t adder( length % n_ports );</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;      <span class="keywordflow">for</span>( <span class="keyword">auto</span> index( 0 ); index &lt; n_ports; index++ )</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;      {</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;         <span class="keyword">const</span> std::size_t start_index( index * inc );</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;         <a class="code" href="struct_port_info.html">PortInfo</a> pi( <span class="keyword">typeid</span>( T ), </div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;                      (<span class="keywordtype">void</span>*)&amp;( existing_buff_t[ start_index ] ) ,</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;                      inc + ( index == (n_ports - 1) ? adder : 0 ),</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;                      start_index );</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;         pi.my_kernel = <a class="code" href="class_port.html#ac17060db235459adaab87cdccb605884">kernel</a>;</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;         <span class="keyword">const</span> std::string name( std::to_string( index ) );</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;         pi.my_name   = name;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;         (<span class="keyword">this</span>)-&gt;initializeConstMap&lt; T &gt;( pi );</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;         (<span class="keyword">this</span>)-&gt;initializeSplit&lt;    T &gt;( pi );</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;         (<span class="keyword">this</span>)-&gt;initializeJoin&lt;     T &gt;( pi );</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;         <a class="code" href="class_port.html#a537a8a0c2a47acbf8654f286200aee90">portmap</a>.map.insert( std::make_pair( name, pi ) );</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;      }</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;      <span class="keywordflow">return</span>( <span class="keyword">true</span> );</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;   }</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;   <span class="keyword">const</span> std::type_index&amp; <a class="code" href="class_port.html#af34969d8f5e17ad29233334526d5b77b">getPortType</a>( <span class="keyword">const</span> std::string &amp;&amp;port_name );</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;   <span class="keyword">virtual</span> FIFO&amp; <a class="code" href="class_port.html#a08cf165426982d83e5a191ba74cc6e5d">operator[]</a>( <span class="keyword">const</span> std::string &amp;&amp;port_name );</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="class_port.html#a7042f5b5c2ab14c9591a4984811a6012">hasPorts</a>();</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;  </div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;   <span class="keyword">virtual</span> <a class="code" href="class_port_iterator.html">PortIterator</a> <a class="code" href="class_port.html#abf4d86026b67f6c02db3e3abb0f2e8b4">begin</a>();</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;   <span class="keyword">virtual</span> <a class="code" href="class_port_iterator.html">PortIterator</a> <a class="code" href="class_port.html#aa85be3fb7734863d482bf002e0f0923d">end</a>();</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;   </div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;   std::size_t <a class="code" href="class_port.html#a33562ea87ac7e83a32441da40cbd9279">count</a>();</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;   <span class="comment">/*******</span></div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;<span class="comment">    * SOME OPERATOR OVERLOADING STUFFS TO MAKE LIFE EASIER </span></div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;<span class="comment">    */</span></div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;   </div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00207"></a><span class="lineno"><a class="line" href="class_port.html#a90a9a883b2e10871e7a8dc55ab0077f5">  207</a></span>&#160;   <span class="keyword">template</span> &lt; <span class="keyword">class</span> T &gt; <span class="keywordtype">void</span> <a class="code" href="class_port.html#a90a9a883b2e10871e7a8dc55ab0077f5">initializeConstMap</a>( <a class="code" href="struct_port_info.html">PortInfo</a> &amp;pi )</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;   {</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;      pi.<a class="code" href="struct_port_info.html#a714592b5ab1fa47b599903639b102a66">const_map</a>.insert(  </div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;         std::make_pair( Type::Heap , <span class="keyword">new</span> instr_map_t() ) );</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;      </div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;      pi.<a class="code" href="struct_port_info.html#a714592b5ab1fa47b599903639b102a66">const_map</a>[ Type::Heap ]-&gt;insert(</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;         std::make_pair( <span class="keyword">false</span> ,</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;                         RingBuffer&lt; T, Type::Heap, false &gt;::make_new_fifo ) );</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;      pi.<a class="code" href="struct_port_info.html#a714592b5ab1fa47b599903639b102a66">const_map</a>[ Type::Heap ]-&gt;insert(</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;         std::make_pair( <span class="keyword">true</span> ,</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;                         RingBuffer&lt; T, Type::Heap, true &gt;::make_new_fifo ) );</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;      pi.<a class="code" href="struct_port_info.html#a714592b5ab1fa47b599903639b102a66">const_map</a>.insert( std::make_pair( Type::SharedMemory, <span class="keyword">new</span> instr_map_t() ) );</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;      pi.<a class="code" href="struct_port_info.html#a714592b5ab1fa47b599903639b102a66">const_map</a>[ Type::SharedMemory ]-&gt;insert(</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;         std::make_pair( <span class="keyword">false</span> ,</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;                         RingBuffer&lt; T, Type::SharedMemory &gt;::make_new_fifo ) );</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;      <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;   }</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;</div>
<div class="line"><a name="l00237"></a><span class="lineno"><a class="line" href="class_port.html#a7189f6823a0d240396210a7c317d4803">  237</a></span>&#160;   <span class="keyword">template</span> &lt; <span class="keyword">class</span> T &gt; <span class="keywordtype">void</span> <a class="code" href="class_port.html#a7189f6823a0d240396210a7c317d4803">initializeSplit</a>( <a class="code" href="struct_port_info.html">PortInfo</a> &amp;pi )</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;   {</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;      pi.<a class="code" href="struct_port_info.html#a6b7e8758b84288a4378233251252be77">split_func</a> = </div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;         []() -&gt; <a class="code" href="classraft_1_1kernel.html">raft::kernel</a>*</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;         {</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;            <span class="keywordflow">return</span>(  <span class="keyword">new</span> <a class="code" href="classraft_1_1split.html">raft::split&lt; T, roundrobin &gt;</a>()  );</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;         };</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;      <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;   }</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;</div>
<div class="line"><a name="l00256"></a><span class="lineno"><a class="line" href="class_port.html#a179c9a36189eb621a5874a0741708e59">  256</a></span>&#160;   <span class="keyword">template</span> &lt; <span class="keyword">class</span> T &gt; <span class="keywordtype">void</span> <a class="code" href="class_port.html#a179c9a36189eb621a5874a0741708e59">initializeJoin</a>( <a class="code" href="struct_port_info.html">PortInfo</a> &amp;pi )</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;   {</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;      pi.join_func =</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;         []() -&gt; <a class="code" href="classraft_1_1kernel.html">raft::kernel</a>*</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;         {</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;            <span class="keywordflow">return</span>(  <span class="keyword">new</span> <a class="code" href="classraft_1_1join.html">raft::join&lt; T, roundrobin &gt;</a>() );</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;         };</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;      <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;   }</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;   </div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;   <a class="code" href="struct_port_info.html">PortInfo</a>&amp; <a class="code" href="class_port.html#a4af1cb062940ca3b83c569f024b9a8d1">getPortInfo</a>();</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;   <a class="code" href="struct_port_info.html">PortInfo</a>&amp; <a class="code" href="class_port.html#afb426a015195fa9b4b5b1d1200daf8ed">getPortInfoFor</a>( <span class="keyword">const</span> std::string port_name );</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160; </div>
<div class="line"><a name="l00286"></a><span class="lineno"><a class="line" href="class_port.html#a537a8a0c2a47acbf8654f286200aee90">  286</a></span>&#160;   <a class="code" href="structportmap__t.html">portmap_t</a>   <a class="code" href="class_port.html#a537a8a0c2a47acbf8654f286200aee90">portmap</a>;</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;</div>
<div class="line"><a name="l00291"></a><span class="lineno"><a class="line" href="class_port.html#ac17060db235459adaab87cdccb605884">  291</a></span>&#160;   <a class="code" href="classraft_1_1kernel.html">raft::kernel</a> *    <a class="code" href="class_port.html#ac17060db235459adaab87cdccb605884">kernel</a>            = <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    </div>
<div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="class_port.html#a78bf16e68f1dd5312f37b4e2806a9cf8">  298</a></span>&#160;   <span class="keywordtype">void</span> * <span class="keyword">const</span>      <a class="code" href="class_port.html#a78bf16e68f1dd5312f37b4e2806a9cf8">alloc_ptr</a>         = <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;   </div>
<div class="line"><a name="l00304"></a><span class="lineno"><a class="line" href="class_port.html#a98d2e7e0e570e082465c692083300fa9">  304</a></span>&#160;   <span class="keyword">const</span> std::size_t <a class="code" href="class_port.html#a98d2e7e0e570e082465c692083300fa9">alloc_ptr_length</a>  = 0;</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;   </div>
<div class="line"><a name="l00307"></a><span class="lineno"><a class="line" href="class_port.html#aed45534b6a99d5630dcfa9eedbe023fc">  307</a></span>&#160;   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_map_base.html">MapBase</a>;</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_map.html">Map</a>;</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_graph_tools.html">GraphTools</a>; </div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classbasic__parallel.html">basic_parallel</a>;</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classraft_1_1parallel__k.html">raft::parallel_k</a>;</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;};</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* END _PORT_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="class_port_html_a98d2e7e0e570e082465c692083300fa9"><div class="ttname"><a href="class_port.html#a98d2e7e0e570e082465c692083300fa9">Port::alloc_ptr_length</a></div><div class="ttdeci">const std::size_t alloc_ptr_length</div><div class="ttdef"><b>Definition:</b> port.hpp:304</div></div>
<div class="ttc" id="class_port_html_a90a9a883b2e10871e7a8dc55ab0077f5"><div class="ttname"><a href="class_port.html#a90a9a883b2e10871e7a8dc55ab0077f5">Port::initializeConstMap</a></div><div class="ttdeci">void initializeConstMap(PortInfo &amp;pi)</div><div class="ttdef"><b>Definition:</b> port.hpp:207</div></div>
<div class="ttc" id="class_port_html_afb426a015195fa9b4b5b1d1200daf8ed"><div class="ttname"><a href="class_port.html#afb426a015195fa9b4b5b1d1200daf8ed">Port::getPortInfoFor</a></div><div class="ttdeci">PortInfo &amp; getPortInfoFor(const std::string port_name)</div><div class="ttdef"><b>Definition:</b> port.cpp:108</div></div>
<div class="ttc" id="struct_port_info_html_a714592b5ab1fa47b599903639b102a66"><div class="ttname"><a href="struct_port_info.html#a714592b5ab1fa47b599903639b102a66">PortInfo::const_map</a></div><div class="ttdeci">std::map&lt; Type::RingBufferType, instr_map_t * &gt; const_map</div><div class="ttdef"><b>Definition:</b> port_info.hpp:88</div></div>
<div class="ttc" id="class_port_html_a4af1cb062940ca3b83c569f024b9a8d1"><div class="ttname"><a href="class_port.html#a4af1cb062940ca3b83c569f024b9a8d1">Port::getPortInfo</a></div><div class="ttdeci">PortInfo &amp; getPortInfo()</div><div class="ttdef"><b>Definition:</b> port.cpp:121</div></div>
<div class="ttc" id="class_port_html_ac7da4ae14a771d5509e743e98fe0dc05"><div class="ttname"><a href="class_port.html#ac7da4ae14a771d5509e743e98fe0dc05">Port::Port</a></div><div class="ttdeci">Port(raft::kernel *k)</div><div class="ttdef"><b>Definition:</b> port.cpp:33</div></div>
<div class="ttc" id="classbasic__parallel_html"><div class="ttname"><a href="classbasic__parallel.html">basic_parallel</a></div><div class="ttdef"><b>Definition:</b> basicparallel.hpp:48</div></div>
<div class="ttc" id="class_map_base_html"><div class="ttname"><a href="class_map_base.html">MapBase</a></div><div class="ttdef"><b>Definition:</b> mapbase.hpp:100</div></div>
<div class="ttc" id="class_port_html_ac17060db235459adaab87cdccb605884"><div class="ttname"><a href="class_port.html#ac17060db235459adaab87cdccb605884">Port::kernel</a></div><div class="ttdeci">raft::kernel * kernel</div><div class="ttdef"><b>Definition:</b> port.hpp:291</div></div>
<div class="ttc" id="class_port_html_abf4d86026b67f6c02db3e3abb0f2e8b4"><div class="ttname"><a href="class_port.html#abf4d86026b67f6c02db3e3abb0f2e8b4">Port::begin</a></div><div class="ttdeci">virtual PortIterator begin()</div><div class="ttdef"><b>Definition:</b> port.cpp:90</div></div>
<div class="ttc" id="class_port_html_a537a8a0c2a47acbf8654f286200aee90"><div class="ttname"><a href="class_port.html#a537a8a0c2a47acbf8654f286200aee90">Port::portmap</a></div><div class="ttdeci">portmap_t portmap</div><div class="ttdef"><b>Definition:</b> port.hpp:286</div></div>
<div class="ttc" id="classraft_1_1parallel__k_html"><div class="ttname"><a href="classraft_1_1parallel__k.html">raft::parallel_k</a></div><div class="ttdef"><b>Definition:</b> parallelk.hpp:35</div></div>
<div class="ttc" id="class_graph_tools_html"><div class="ttname"><a href="class_graph_tools.html">GraphTools</a></div><div class="ttdef"><b>Definition:</b> graphtools.hpp:56</div></div>
<div class="ttc" id="classraft_1_1split_html"><div class="ttname"><a href="classraft_1_1split.html">raft::split</a></div><div class="ttdef"><b>Definition:</b> port.hpp:53</div></div>
<div class="ttc" id="class_port_html_a78bf16e68f1dd5312f37b4e2806a9cf8"><div class="ttname"><a href="class_port.html#a78bf16e68f1dd5312f37b4e2806a9cf8">Port::alloc_ptr</a></div><div class="ttdeci">void *const alloc_ptr</div><div class="ttdef"><b>Definition:</b> port.hpp:298</div></div>
<div class="ttc" id="class_port_base_html"><div class="ttname"><a href="class_port_base.html">PortBase</a></div><div class="ttdef"><b>Definition:</b> portbase.hpp:28</div></div>
<div class="ttc" id="class_port_html_a7042f5b5c2ab14c9591a4984811a6012"><div class="ttname"><a href="class_port.html#a7042f5b5c2ab14c9591a4984811a6012">Port::hasPorts</a></div><div class="ttdeci">virtual bool hasPorts()</div><div class="ttdef"><b>Definition:</b> port.cpp:84</div></div>
<div class="ttc" id="struct_port_info_html_a6b7e8758b84288a4378233251252be77"><div class="ttname"><a href="struct_port_info.html#a6b7e8758b84288a4378233251252be77">PortInfo::split_func</a></div><div class="ttdeci">split_factory_t split_func</div><div class="ttdef"><b>Definition:</b> port_info.hpp:96</div></div>
<div class="ttc" id="class_port_html_aaf89e298b9ae64f9c42703c14d9eed0a"><div class="ttname"><a href="class_port.html#aaf89e298b9ae64f9c42703c14d9eed0a">Port::addInPlacePorts</a></div><div class="ttdeci">bool addInPlacePorts(const std::size_t n_ports)</div><div class="ttdef"><b>Definition:</b> port.hpp:124</div></div>
<div class="ttc" id="class_port_html_afe166c2a6b10ad34d47472a150366bc1"><div class="ttname"><a href="class_port.html#afe166c2a6b10ad34d47472a150366bc1">Port::~Port</a></div><div class="ttdeci">virtual ~Port()</div><div class="ttdef"><b>Definition:</b> port.cpp:48</div></div>
<div class="ttc" id="class_port_html_a179c9a36189eb621a5874a0741708e59"><div class="ttname"><a href="class_port.html#a179c9a36189eb621a5874a0741708e59">Port::initializeJoin</a></div><div class="ttdeci">void initializeJoin(PortInfo &amp;pi)</div><div class="ttdef"><b>Definition:</b> port.hpp:256</div></div>
<div class="ttc" id="class_map_html"><div class="ttname"><a href="class_map.html">Map</a></div><div class="ttdef"><b>Definition:</b> map.hpp:47</div></div>
<div class="ttc" id="class_port_html_a08cf165426982d83e5a191ba74cc6e5d"><div class="ttname"><a href="class_port.html#a08cf165426982d83e5a191ba74cc6e5d">Port::operator[]</a></div><div class="ttdeci">virtual FIFO &amp; operator[](const std::string &amp;&amp;port_name)</div><div class="ttdef"><b>Definition:</b> port.cpp:68</div></div>
<div class="ttc" id="class_port_html_a33562ea87ac7e83a32441da40cbd9279"><div class="ttname"><a href="class_port.html#a33562ea87ac7e83a32441da40cbd9279">Port::count</a></div><div class="ttdeci">std::size_t count()</div><div class="ttdef"><b>Definition:</b> port.cpp:102</div></div>
<div class="ttc" id="classraft_1_1join_html"><div class="ttname"><a href="classraft_1_1join.html">raft::join</a></div><div class="ttdef"><b>Definition:</b> port.hpp:52</div></div>
<div class="ttc" id="class_port_html"><div class="ttname"><a href="class_port.html">Port</a></div><div class="ttdef"><b>Definition:</b> port.hpp:57</div></div>
<div class="ttc" id="struct_port_info_html"><div class="ttname"><a href="struct_port_info.html">PortInfo</a></div><div class="ttdef"><b>Definition:</b> port_info.hpp:39</div></div>
<div class="ttc" id="class_port_html_aa85be3fb7734863d482bf002e0f0923d"><div class="ttname"><a href="class_port.html#aa85be3fb7734863d482bf002e0f0923d">Port::end</a></div><div class="ttdeci">virtual PortIterator end()</div><div class="ttdef"><b>Definition:</b> port.cpp:96</div></div>
<div class="ttc" id="class_port_html_af34969d8f5e17ad29233334526d5b77b"><div class="ttname"><a href="class_port.html#af34969d8f5e17ad29233334526d5b77b">Port::getPortType</a></div><div class="ttdeci">const std::type_index &amp; getPortType(const std::string &amp;&amp;port_name)</div><div class="ttdef"><b>Definition:</b> port.cpp:57</div></div>
<div class="ttc" id="classraft_1_1kernel_html"><div class="ttname"><a href="classraft_1_1kernel.html">raft::kernel</a></div><div class="ttdef"><b>Definition:</b> kernel.hpp:57</div></div>
<div class="ttc" id="class_port_html_aeb1c43cc7563ce977ba0bc7b581d2e75"><div class="ttname"><a href="class_port.html#aeb1c43cc7563ce977ba0bc7b581d2e75">Port::addPort</a></div><div class="ttdeci">void addPort(const std::string &amp;&amp;port_name)</div><div class="ttdef"><b>Definition:</b> port.hpp:92</div></div>
<div class="ttc" id="namespaceraft_html"><div class="ttname"><a href="namespaceraft.html">raft</a></div><div class="ttdef"><b>Definition:</b> globalmap.cpp:3</div></div>
<div class="ttc" id="class_port_html_a7189f6823a0d240396210a7c317d4803"><div class="ttname"><a href="class_port.html#a7189f6823a0d240396210a7c317d4803">Port::initializeSplit</a></div><div class="ttdeci">void initializeSplit(PortInfo &amp;pi)</div><div class="ttdef"><b>Definition:</b> port.hpp:237</div></div>
<div class="ttc" id="class_port_already_exists_html"><div class="ttname"><a href="class_port_already_exists.html">PortAlreadyExists</a></div><div class="ttdef"><b>Definition:</b> portexception.hpp:74</div></div>
<div class="ttc" id="class_port_iterator_html"><div class="ttname"><a href="class_port_iterator.html">PortIterator</a></div><div class="ttdef"><b>Definition:</b> portiterator.hpp:32</div></div>
<div class="ttc" id="structportmap__t_html"><div class="ttname"><a href="structportmap__t.html">portmap_t</a></div><div class="ttdef"><b>Definition:</b> portmap_t.hpp:27</div></div>
<div class="ttc" id="classroundrobin_html"><div class="ttname"><a href="classroundrobin.html">roundrobin</a></div><div class="ttdef"><b>Definition:</b> roundrobin.hpp:27</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
